.class public Lcom/TwinBlade/PicturePassword/ColorPreference;
.super Landroid/preference/Preference;
.source "SourceFile"


# instance fields
.field private a:Landroid/content/Context;

.field private b:I

.field private c:I

.field private d:I

.field private e:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter

    .prologue
    .line 27
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/TwinBlade/PicturePassword/ColorPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 28
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 4
    .parameter
    .parameter

    .prologue
    .line 21
    invoke-direct {p0, p1, p2}, Landroid/preference/Preference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 18
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->e:Z

    .line 22
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->a:Landroid/content/Context;

    .line 23
    const/16 v0, 0xff

    const/16 v1, 0x39

    const/16 v2, 0x92

    const/16 v3, 0xb5

    invoke-static {v0, v1, v2, v3}, Landroid/graphics/Color;->argb(IIII)I

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->b:I

    .line 24
    return-void
.end method

.method private a()I
    .locals 6

    .prologue
    .line 79
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 80
    const-string v1, "ThemeColor"

    const/16 v2, 0xff

    const/16 v3, 0x39

    const/16 v4, 0x92

    const/16 v5, 0xb5

    invoke-static {v2, v3, v4, v5}, Landroid/graphics/Color;->argb(IIII)I

    move-result v2

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/ColorPreference;)I
    .locals 1
    .parameter

    .prologue
    .line 16
    iget v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->c:I

    return v0
.end method

.method private a(I)V
    .locals 2
    .parameter

    .prologue
    .line 74
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 75
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "ThemeColor"

    invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 76
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/ColorPreference;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 17
    iput p1, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->d:I

    return-void
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/ColorPreference;)I
    .locals 1
    .parameter

    .prologue
    .line 17
    iget v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->d:I

    return v0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/ColorPreference;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 73
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/ColorPreference;->a(I)V

    return-void
.end method


# virtual methods
.method public onClick()V
    .locals 4

    .prologue
    .line 32
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->e:Z

    if-eqz v0, :cond_0

    .line 33
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/ColorPreference;->a()I

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->d:I

    .line 34
    iget v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->d:I

    iput v0, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->c:I

    .line 35
    new-instance v0, Lcom/TwinBlade/PicturePassword/e;

    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->a:Landroid/content/Context;

    .line 36
    new-instance v2, Lcom/TwinBlade/PicturePassword/m;

    invoke-direct {v2, p0}, Lcom/TwinBlade/PicturePassword/m;-><init>(Lcom/TwinBlade/PicturePassword/ColorPreference;)V

    .line 47
    iget v3, p0, Lcom/TwinBlade/PicturePassword/ColorPreference;->d:I

    .line 35
    invoke-direct {v0, v1, v2, v3}, Lcom/TwinBlade/PicturePassword/e;-><init>(Landroid/content/Context;Lcom/TwinBlade/PicturePassword/j;I)V

    .line 49
    new-instance v1, Lcom/TwinBlade/PicturePassword/n;

    invoke-direct {v1, p0}, Lcom/TwinBlade/PicturePassword/n;-><init>(Lcom/TwinBlade/PicturePassword/ColorPreference;)V

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/e;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    .line 57
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/e;->setCanceledOnTouchOutside(Z)V

    .line 58
    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/e;->show()V

    .line 60
    :cond_0
    return-void
.end method
